Copyright: 1997 Jarle (jgaa) Aase


Beta Notice

War FTP Daemon  1.70 beta 1

Known problems:

  * The manager does not handle sever shutdown very good.

  * Some cosmetic bugs in the manager

Unimplemeted features:

  * Vfsys

  * Disk quota limit

  * Aliases for user accounts

  * Remote file browser in the manager

  * Dupe checker

  * Plugin interface

  * ... and some others I don't recall right now

Short-time priorities:

  * Linux/FreeBSD port

  * New online bug-tracking system

    (will be released with source code under GPL)

  * Bugfixes

  * Implementig the missing features

Long-time priorities (version 3):

  * NIS support

  * UNICODE support

  * Implementing the iftp-ftpxt drafts

  * Implementing RFC 2228 (encryption)

  * SQL engine for access to the server (ODBC)

  * Support for using a SQL server as storage for the user database

  * FTP/Proxy support

  * HTTP/Proxy support

This help file was created with HelpScribble.


Technote: Subclassing

The user database has been designed in a way that makes it easy to subclass a user to other user databases. Currently you can link to one or several NT userdatabases. UNIX users and NIS support are planned for the UNIX version.

When a user account is subclasssed, the War user database will use the external database for autentication (logon). That means that a subclassed NT user will share the NT password on both systems. Auditing of user accounts in either system (NT user manager or War user manager) will affect both systems transparent to you. If you delete a subclassed user in the War user manager, the user will also be deleted from the NT user database, and vica verca.

In order to subclass a user to the NT userdatabase, the War server must run on a NT server or NT workstation. The reason for this is that Windows95 does not support the network calls needed to manipulate NT user accounts. The server must also run in the user space of an administrator. If you want to subclass NT Domain users, the server must run in the user space of a NT Domain admin.

How does it work?

Subclassing is actually just another user recursive user property. You can subclass a node on any level in the user-tree, and all children of that node will inherit the subclassing. Normally you wil create a class in the user tree named 'NTUsers' and subclass that to the NT user database.

When you subclass a user-node, you select a NT domain or machine, and a group from that domain or machines user database. All users on the domain or machine that belong in the selected NT group will automatically be part of the War user database. If you create a new user in the War daemon manager, under the subclassed node, a similar NT user account wil be created, and assigned to the selected group. NT users that does not belong to that group are not affetced.

Normally you will subclass the user database on the machine where the War server is running. But you can easily subclass local and global users from any NT domain or machine on the network. Just create another War user-class, and subclass it to another NT domain or machine, or to another group on the same machine. But make sure that one NT user does not belong to two subclassed NT groups.

What happen if I change the subclassing?

Nothing much, eacept that the link between the two systems are broken. Users that were created with the NT user manager, and never logged on to the War server will still exist in the War user database, but they will have a random generated password, and will therefore not be able to log on (to the War server). If you re-assign the same subclassing, everytning will be as it before.

Steps to subclass a NT User database

•	Open the War user manager

•	Select the Account/Subclassing dialog

•	Create or select the node in the user-tree where the subclassing should occur

•	Change the subclass value from 'Default' to 'NT'

•	Click on the Browse button

•	Select the NT domain or machine you want to subclass

•	Right click on the NT group list and select 'New Local NT usergroup'

•	Give the new NT group a name and optionally a comment

•	Press OK. A new, empty NT usergroup is now created on the NT server. (If you already have a suitable NT group, you can use that. You don't need to create a new group)

•	Select the new group (or an existing group) and press OK.

That's it. The War user-database is now subclassed from the current node and down.

NT spesific: The user manager does not have to run on a NT machine in order to browse the NT network, or alter the NT user database. All NT network calls are routed trough the user manager in the War server.

See also: Account - Subclassing

This help file was created with HelpScribble.


User Manager button
Opens the User Manager.

This help file was created with HelpScribble.


Shutdown Now button
The Shutdown Now button button is used to shut down the server imediately. Ongoing transfers will be aborted, and all users thrown off the system.

This help file was created with HelpScribble.


Shutdown When Ready button
The Shutdown When Ready button button is used to shut down the server. Idle users are logged off. Users that are transferring files will be allowed to complete the current transfer before they are logged off. When all users are logged off, the server shuts itself down.

This help file was created with HelpScribble.


Start button
The Start button starts the server on the local machine. If the server is running under NT, and configured to run as a NT service, the service is started. It is not possible to start a server on another machine.

This help file was created with HelpScribble.


User File System
The User File System is the file system as seen by the user. The User File System starts at / and can be quite different from the physical file system on the machine.

This help file was created with HelpScribble.


Refresh button
Use this button to refresh the information from the server. Normally the information will be refreshed rapidly (depending on the connection type spesified in the connection properties). You will normally use the refresh button when the refresh rate is set to manual, or at long delays.

This help file was created with HelpScribble.


Connect/Disconnect button
Press this button to connect or disconnect to/from the server. The server must be running in order for you to connect. If you are using the server on your local machine, you can press the START button to start and connect to the server.

This help file was created with HelpScribble.


Kick button
Kicks a user off the system.

This help file was created with HelpScribble.


Abort button
Aborts the current transfer for a user or group of users.

This help file was created with HelpScribble.


Technote: Compiling the source code

This note applies for those who have the full source code for War FTP Daemon 1.70.

The source code is currently not public available.

It will be released in public when the Linux version of the software is ready.

There are two projects to compile, WaFTPDv1 and WarDaemonManager

WaFTPDv1 contains libraries used by the manager, and must be compiled first. The libraries used in the manager require a "Win32 Debug" or "Win32 release" build of the WaFTPDv1project.

Steps to build a debug version of the server and manager.

1 - Load the WaFTPDv1 project

2 - Go to the File View in the project manager and make sure that all subprojects are loaded. Right click on any grey subprojects and execute the "Load Project" popup.menu command.

3 - Select wrpcgen as the current project and "Win32 Release" as active configuration

4 - Compile wrpcgen

5 - Select WaFTPDv1 as the current project and "Win32 Debug" as active configuration.

6 - Perform a full recompilation. This will build the libraries and the server. Ignore the LNK4049 link warning.

7 - Load the WarDaemonManager project

8 - Select "Win32 Debug" as the active configuration

9 - Perform a full recompilation. Ignore the LNK4049 link warning.

If you want to use the Windows version of the server for the debug sessions, go trough steps 5 and 6 once more. Select "Win32 WDebug" as the active configuration.

If you run out of memory during linking, you might have to unload some of the subprojects to free memory. I have run out of memory using when testing the source code distribution with Win95 and 90 MB or RAM.

File locations

Binaries are compiled into .\Bin or .\DebugBin, depending on the current configuration.

Configuring Developer Studio

The source code is formatted for a tab space value of 2

Notes

wrpcgen is a customized version of rpcgen (Sun) and is used to build parts of the source code from *.x RPC definition files.

The total disk space needed to compile the server is about 100 MB.

This help file was created with HelpScribble.


Changes since version 1.65

The entire server is rewritten, and the internal design changed. Only a few hundred lines of source code is left since version 1.6.

The design of the user database have changed to make it easier to understand and use. The new user database is very similar to a traditional file system tree with folders and subfolders.

The most exiting new features are:

  * Remote administration: - The server's user interface is a seperate program, connecting to the server using UDP/IP.

  * CPS limit

  * Extensive ODBC support and SQL query interface

  * Programming API for the server.

  * CdFs - new fdile system for CD-ROM players and changers

This help file was created with HelpScribble.


Technote: The power of inheritance

Many of the objects in the User Database can be recursively set. That is, the property value for an object can be set to default, which means that the server looks at the node above in the object tree for the value to use. Let's have an example. One of the properties is the right to log on to the FTP server. Yop can set this property on each user, but that will give you quite some work if you want to disable a group of users. If you set this value to default on the user level (user object), you can allow or deny any nuber of users just by toggeling the property on a higher level.

The correct way to add users is to group users that belongs together in classes. Each virtual domain can have any number of classes, and each class can have any number of users. You should set as few properties as possible on the user objects itself, and use the class properties to define any properties that the users share (such as up/download ratios, file access paths, login permissions, CPS limit etc.) That way you can add or delete a right on all the users in the class just by changing the class properties.

Just as the user objects inherits the properties from the class, the class inherits the settings of the virtual domain (sometimes reffered to as virtual server). Any settings that are shared among classes should be set at the virtual domain level. That way you can change the settings for all classes and users just by changing the properties for the virtual domain.

File paths is a good example on how thius works:

If yuo add access to the path C:\FTP to "System", all users will have access to this path:

System << C:FTP read+recursive+list

  |

  +--Users

  |  |

  |  +--Bob

  |  +--Bill

  +--Visitor

     |

     +--Anonymous

If Anonumous logs on, he will get access to /ftp. If you run a membership service, where you offer some special files to the members, you can add a class for the members, and assign the special directory for the members.

System << C:\Ftp read+recursive+list

  |

  +--Members << D:\Classified\Members read+recursive+list

  +  +--Jane

  |  +--Juliett

  |

  +--Users

  |  |

  |  +--Bob

  |  +--Bill

  +--Visitor

     |

     +--Anonymous

Anonymous, Bob and Bill will still just see /Ftp, while Jane and Juleitt sees /Ftp and /Members

Say that you have some members that are real kind and want's to help out maintaining the files you distribute to the members. You then add a class, Super, and assign that class full rights to the membership path.

System << C:\Ftp read+recursive+list

  |

  +--Members << D:\Classified\Members read+recursive+list

  |  |

  |  +Super << D:\Classified\Members read+recursive+list+wrire+delete

  |  |  |

  |  |  +--Wilma

  |  |  +--Anthon

  |  |

  +  +--Jane

  |  +--Juliett

  |

  +--Users

  |  |

  |  +--Bob

  |  +--Bill

  +--Visitor

     |

     +--Anonymous

All the users will have excactly the same rights as before, except for Wilma ans Anton who can upload to the member dir, and delete files there. In you want to give Jane the same privileges as Wilma, you simply move her to the Super class by dragging&dropping her into Super in the user manager. If you want to remove Wilmas special rights, simple drag&drop her out of the Super group.

Using inheritance makes it a simple task to maintain even a huge site, and reduce the chance of forgettingg to set/remove rights on the individual users.

See also: User Manager, User Database, File Access

This help file was created with HelpScribble.


Understanding the user manager

The user manager can look confusing the first time you open it, but it is actually really simple to use.

The node tree let's you add, delete, move or select an object node. To add or delete, press the right mouse button and choose from the pop-up menu. To move, simply drag&drop the object into another folder. To select, click on the object.

The selection selection limits the number of selections in the selection tree, so that you get the choises accurant for what you are doing. If you f.eks are changing the ip or port number, you will select the "admin" tab to enable the "server configuration" setting.

The property selection tree let's you choose a property to alter.

An finally, the properties area let you do the actual work.

The most confusing part in the old user manager (version 1.6*) was to keep track of the effective properties for a user. Since properties oftan are inherited, you could spend lots of time browsing here and there to find the actual setting. In the new user manager, the effective setting is always shown in a yellow window close to where you can change the setting.

In the example above, the effective setting is 5 minutes, and the icon reviels that this setting was defined at the Class level.

Some properties, such as the File Access paths, are listed, and properties from several levels can be effective in the same window. To distringuish between the settings at the current level, and the levels above, the curent level items are white, while the inherited items are yellow. You can edit the white items, but not the inherited items. In order to edit a inherited item, look att the level-icon and select the same icon in the object tree. Now the item you need to change have turned white.

Tip: One neat feature in the user manager is the ability to turn it into a Explorer like user browser. If you click on the button left of the properties headline, the properties and selection part of the windows is replaced with a list-view where you can select multiple objects for drag&drop.

See also: User Manager

This help file was created with HelpScribble.


Technote: CdFs

The CD-ROM File System is a custom designed file system for CD-ROM players and CD-ROM jukboxes/changers that provides the best possible performance from a multi-user FTP server to slow CD-ROM devices.

CdFs will copy the files requested by the FTP users to the harddisk, and download it from the harddisk. The download will start as soon as the copy process have started, and will continue during the copy process.

The files copied to the harddisk will remain on the harddisk until the available free diskspace goes under 1 MB, the limit on the cache-size is exeeded, or the file times out.

In CdFs you define CD units and CD devices.

A unit has one or more CD devices.

Each unit starts 1 or more threads to access the CD devices for that unit. If you set the thread limit to 1, there will never be more than 1 IO operation on the unit at one time. This allows a file to be copied from a cd-changer before a new CD is requested. This gives optimal speed. The maximum number of threads pr. unit is 16.

When a CD ROM is scanned, an image of the directory structure is stored on disk. The only time the original disk is accessed, is when someone request a file from the CD. The file is then copied to the disk. The copy of the file remains on the harddisk for a while (in case someone else wants to download it).

The image of the CD-ROM's directory structure is optimized to use as little memory as possible (without packing data) and to be extreemly fast to swap in and out of memory (one memory allocation and one read operation).

The CD-ROM's can be mapped into any location in the users visible (virtual) file system. From the system console, you assign the location as cdrom//devicename where "devicename" is the logical name assigned to a CD-ROM device (the unit's are not part of the path).

If you say cdrom//$/ntwks40 the device name is ignored, and the path will map to whatever drive a CD with the label ntwks40 is in.

The URL like path is used to allow different file systems to be mapped into the logical directories presented to the user.

A setup can look like

file://C\ftp\home*           /

file://C\ftp\home\public    /pub

file://E\ftp\download\apps  /pub/apps

cdrom://drive_1             /pub/cdrom1

cdrom://drive_2             /pub/cdrom2

cdrom://drive_3             /pub/cdrom3

cdrom://drive_4             /pub/cdrom4

cdrom://ndrive_1            /pub/apps/oldstuff

cdrom://$/ntwks40           /nt_workstation

cdrom://$/myimg             /pub/images

where the CD-roms (1 local and one network CD changer and one local IDE

drive) are defined as

Unit     Device   Physical path

  unit1   drive_1   K

    "     drive_2   L

    "     drive_3   M

    "     drive_5   N

  unit2   ndrive_1  \\server\cd_1

    "     ndrive_2  \\server\cd_2

    "     ndrive_3  \\server\cd_3

    "     ndrive_4  \\server\cd_4

  ide     cd1       I

If /nt_workstation is accessed, and the CD labeled (ntwks40) is not present in any of the CD-ROM drives, the user will get a "drive not ready" error.

*Note: When you specify paths from the File Access tab in the manager, you don't type "file://" or "cdfs://". The file system is selecetd from the combo-box.

See also File Access

This help file was created with HelpScribble.


Command line arguments

War FTP Daemon (war-ftpd.exe) can be started with the following command line arguments:

-verbose	Displays a status window (in addition to the War Daemon Manager). Useful for tracing bugs.

-restore	Deletes and re-creates the "Sysadmin" user. This flag can be used to get access to the server after the password is lost. The password for the re-created "Sysadmin" account is "Sysadmin".

-d[#]	Debug mode. If a number is given (1 - 255) more debug output will be generated.

-notservice	(NT only) When the server is started as a program, and installed as a NT service, there is a 20 seconds delay while the server detects if it is started by the NT sercoce control manager. This flag avoits this test, and speeds up the initialization process.

-install	Installs the server as a system service.

-uninstall	Uninstalls the server as a system service.

This help file was created with HelpScribble.


Database Support

War FTP Daemon 1.70 can write session and file events to a database, providing the operator with a flexible and powerful means of  controlling and monitoring the server activity. The database support use ODBC v.3 to update or query the databse. Tools such as Microsoft Access or Seagate Crystal Reports can be used to produce professional statistics and usage reports.

The server also provide a simple query interface, where SQL queries can be executed and the output presented to the FTP user trough the macro expansion feature. See a sample of a Welcome after Login message.

Supported Database platforms:

Microsoft SQL Server 6.5 and newer

Microsoft Jet Engine (Microsoft Access/DAO) .mdb files

Oracle 8 (not yet verified)

IBM DB2 (not yet verified)

Any ODBC 3 compilant data source which supports updates, indexes, standard functions (like MAX()) and join statements. If you use a non-listed database engine, you will have to set up the databse structure yourself, according to to the specifications of the War Server Database Structure.

You must have ODBC 3.0 installed on the computer in order to use the database feature. You must also have a database engine available, either on the machine, or on the local network.

Enabeling the database feature:

First you must decide what database engine to use. A normal server can do fine with the .mdb file supplied with the server.

Before you can do anything else, you must set up an ODBC connection to the data source.

Setting up ODBC for MS SQL Server 6.5

Setting up ODBC for Microsoft Access/DAO (.mdb file)

If you use an other name for the ODBC connection than the name of the server-tag (default: WARSVR), you must tell the server the name of the ODBC connection.

1) Start the daemon manager, and the server (if it is not already running)

2) Select Server/Advanced Server Properties from the manager-menu.

3) Select odbc_SOURCE

4) Type in the name of the ODBC connection you made for the server

5) Press the [Set] button

6) Stop and re-start the server.

If you need to give a special username or password to log on to the database, follow steps 1 and 2 above and set the odbc_USER and odbc_PASSWD options.

See also Database structure, SQL Macro

This help file was created with HelpScribble.


SQL macro

The macros in the server response messages supports SQL queries.

The syntax is: [$sql, #MaxRowsReturned, SQLStatement]

If #MaxRowsReturned is 0 (zero), all matching rows will be displayed.

See the database structure for available fields and cross references.

Table fields of type binary with field-length = 8 are assumed to be user/server names, and are expanded by the War FTPD SQL query engine.

The execute statement is forced to read-only to prevent data updates from this macro. SQL statements like UPDATE, DROP, or CREATE will give an error.

The SQL syntax and and features available depends on the database you use.

Note: If you careate some cool SQL queries for the messages, make sure to post them to the newsgroup alt.comp.jgaa

Example:

Welcome [$user]. There are [$usersonline] online at the moment.

Latest uploads:

[$sql, 10,select File.UserPath, File.FileSize, FileAccess.AccessDate

from File inner join FileAccess on File.ID = FileAccess.FileID

where FileAccess.Action = 1 order by FileAccess.AccessDate desc]

Most popular files:

[$sql, 10, select UserPath,DlCnt from File where DlCnt > 0 and FileName != 'message.txt' order by DlCnt desc]

Current sessions:

[$sql, 0, select UserID,FromDomainName from session where LogoutTime = null order by LoginTime]

This help file was created with HelpScribble.


Database Structure

Table: Session

Column_name         Type     Length Explanation

------------------- -------  ------ ------------------------------------------------------

ID                  int           4 Unique Key field

UserID              binary        8 64 bit user reference, references the War User Database

LoginTime           datetime      8

LogoutTime          datetime      8

UserName            varchar     128 The login user name (can include email/password)

FromDomain          int           4 IPv4 domain in network bit order

FromDomainName      char        128 Domain name

ServerID            binary        8 64 bit user reference, references the War User Database

ServerName          char         32 Key name of server in the War User Database

SessionID           binary        8 Reserved

Table: File

Column_name         Type     Length Explanation

------------------- -------  ------ ------------------------------------------------------

ID                  int           4 Unique Key field

FileName            varchar     255 File name (MyFile.zip)

FilePath            varchar     255 File Path (c:\test\ftp\files)

DlCnt               int           4 Download counter

UlCnt               int           4 Upload counter

CreationDate        datetime      8 Date the file was added to the database

ModifyDate          datetime      8 Last upload date

LastDownloadDate    datetime      8 Last download date

OwnerID             binary        8 64 bit user reference, references the War User Database

Permissions         int           4 Reserved

Comment             varchar     255 Reserved

SessionID           int           4 Reference to Session.ID

Fsys                char          8 File sustem (file://)

FileSize            int           4 Size in bytes of binary image

UserPath            varchar     255 The path as the owner sees it (/pub/MyFile.zip)

Table: FileAccess

Column_name         Type     Length Explanation

------------------- -------  ------ ------------------------------------------------------

ID                  int           4 Unique Key field

FileID              int           4 Reference to File.ID

UserID              binary        8 64 bit user reference, references the War User Database

Action              smallint      2 0 = dowload, 1 = upload

CPS                 int           4 Average CPS for the transfer

AccessDate          datetime      8 The date the action was taken

SessionID           int           4 References Session.ID

This help file was created with HelpScribble.


Setting up ODBC for MS SQL Server 6.5

Before you can instll the ODBC connection, you must create a new database for the War DTP Daemon. The database does not need to run on the same machine as the FTP server.

Open MS-SQL Server Enterprise Manager and create a new database device for the server database, and a new log device or the database log. See the MS-SQL documentration for deetails on how to do this. The size of the databses depend on the number of transactions (file transfers) your server has. 50 - 100 MB should be sufficient for most sites. The databse size can be expanded later.

Create a new database. You will normally name this with the same name as the server-tag (default: WARSVR).

Start the Query Tool in the Enterprise Manager.

Select the newly created database.

Open the "createWARSVR.sql" file supplied with the server.

Run the SQL script.

The database is now installed. Next up is to install the ODBC driver. Please verify that you have ODBC 3.0 or better on the machine.

Open the ODBC manager from the control panel.

Select "System DSN".

Press the [ADD] button to create a new connection

Enter the "Data source name". You will normally name this with the same name as the server-tag (default: WARSVR).

Press the [Optiona] button.

Enter the "Database name". This is the name of the database you created for the War FTP Daemon, normally WARSVR.

Turn off the "Generate Stored Procedure.." option, as this will fill up the tempdb and can cause problems.

Press OK to save the new ODBC connection.

The login name and password can be configured for the server, but a trusted connection is recommended to use, as this don't compromize security (the user name and password is stored as clear text in a text file by War FTP Daemon if you use the "standard" security option in MS SQL server).

See also: Database Support

This help file was created with HelpScribble.


Setting up ODBC for Microsoft Access/DAO (.mdb file)

There is shipped an empty .mdb file with the server for your convenience. All you have to do to enable the database feature for DAO is to create a new ODBC connection for this file.

Note: MS SQL engine is not distribute with the server. If you don't have DAO (Microsoft Access or the Microsoift Jet Engine) installed, contact one of the support channels to obtain a download URL for this.

Open the ODBC manager from the control panel.

Select "System DSN".

Press the [ADD] button to create a new connection

Enter the "Data source name". You will normally name this with the same name as the server-tag (default: WARSVR).

Press the [Optiona] button.

Select the warsvr.mdb file shipped with the server.

Press OK to save the new ODBC connection.

See also: Database Support

This help file was created with HelpScribble.


Reporting bugs

A new bug-tracking system is in the works. Until this is ready, minor bugs will not be registered. Major bugs can be reported by email to jgaa@jgaa.com. Please include the following information:

- The operating system you are running, including service pack.

- Machine type (CPU, Memory)

- Version of the server

- A brief description of the problem.

- If possible, a step-by-step instruction on how to reproduce the problem.

Be short, concise, and include relevant information, such as part of the log taht can help diagnose the problem.

If you don't follow this guideline, your bug-report will be trashed.

This help file was created with HelpScribble.


Firewall considerations

Firewalls sucks. Some firewalls will only allow FTP connections according to the RFC's, others will do their best to stop FTP transmissions.

In general, corporate firewalls will allow FTP transfers. If you run your server behind a corporate firewall, or not behind a firewall at all, use the default settings (port 21 and dataport 20).

If you use a cablemodem, ISDN or ppp, there is a chance that your lame ISP will try to deny FTP transfers. In such case, set the server up in stealth mode, using a high port for the control  connection (f.eks 2121) and a radom port for the data connection. If you'r lame ISP is plain stupid and don't know a thing about Internet and Internet protocols, you might get away by just setting the random port option.

If the server is behind a lame ISP firewall, and the client behind a corporate firewall, FTP woun't work. Sorry. Change ISP, or start a user-movement among the ISP's users to force the lame ISP to change their policy (and allow FTP servers). Decent ISP's will always allow FTP servers. Cool ISP's even use War FTP Daemon themselvs!

To change the port for the control connection:

1) Start War Daemon Manager and connect to the server

2) Open the User manager by clicking on the User manager button

3) Select the virtual server to change (normally "System")

4) Select the "Admin" tab in the selection selection tab

5) Select Server Configuration in the selections tree

6) Change the port number

7) Stop and restart the server.

To change the stealth mode for the data connection:

1) Start War Daemon Manager and connect to the server

2) Select menu: Server/Advanced Server Properties

3) Select ftpd_BINDDATA

4) Change the value according to the instricctions in the dialog

5) Press the [Set] button. You don't have to restart the server

Note: If you want to access the remote interface trough a firewall, you must (in most cases) set a port for the RPC interface.

To change the RPC port:

1) Start War Daemon Manager and connect to the server

2) Select menu: Server/Advanced Server Properties

3) Select core_RPCPORT

4) Change the value to a spesific port

5) Press the [Set] button.

7) Restart the server.

8) Press ALT-ENTER and set the port in the Daemon Manager's connection properties.

9) Select menu: File/Save and save the new connection settings

10) Re-connect to the server

This help file was created with HelpScribble.


About the author

Well... I don't like to expose myself, but on the other hand, I do receive lot's of emails from people that wonder who I am, and why I release my software as freeware. Of course, I also receive lot's of "business opportunities" from people that realize the commercial potential of my programs and believe that I'm some kind of jerk they can rip off...

To realize why I do what I do, you have to know a little bit about the Norwegian society.

Norway is among the richest countries in the world. The country is well known for it's efforts to make peace in the World, to secure the environment and to enforce human rights everywhere. The government is very eager to make the world a better place - at least outside the Norwegian borders.

Most people here believe that Norway is the best place on earth. I once did too. Until one fatal night about 12 years ago.

At that time I was among the most popular radio journalists in my hometown. One night I was arrested by the police and asked to lay against a person I did not now, in order to get him convicted for burglary. I refused. The next day the police wanted to imprison me, unless I signed their story. My councilor advised me to give a false testimony, sign the statement they wanted and walk out as a free man, as if this was the most natural thing in the world. I was shocked. But I refused and was imprisoned. One week later the police realized who I was, and set me free, with many excuses and hopes that I had "no hard feelings".

When I got back behind the microphone I started to talk about police brutality, bestiality and injustice. About the same time other groups realized what was going on and the police got accused for brutality by a large number of victims. The "good citizens" of the town was shocked about these "wild" accusations, the press called them liars, and many of them was later convicted for "false accusations" against the police. Later on it is proven behind any doubt that the police in my hometown is brutal, that they indeed break the law, imprison innocent people if they feel like it and so on. Even Amnesty International has confirmed the situation. The government however refused to do anything about it. It is a tradition in Norway that no one in the legal system is charged for any crimes they commit "in the line of duty". A few years back a drunk police officer strangled a teenager, on his spare time, and got away with it. I have seen and heard people being tortured in the basement of the local police station. Early 1996 a prisoner was burned to death in his cell in the local prison, after almost a year of illegal imprisonment. They called that suicide.

In 1992 I got into a dispute with one of the criminal police officers in the town. He threatened me several times on my life. To his surprise I got angry, not afraid. When a 12 year old friend of mine run away from an institution and hide in my apartment, while I was in another city, he decided to "get me". I was arrested just after I returned home, but I kept my mouth shot about my alibi. The police thought that I had been in town the entire 2 weeks the boy was missing, and forced him to make false accusations about sexual abuse. Since I am gay, he believed that a conviction would come real easy. When they learned about my alibi they realized that they had a problem. In desperation they started to look for new accusations, and arrested a huge number of my friends in order to force them to testify against me - about anything. After 1 year they finally found a boy I once knew, who was mentally ill and accused me for murder, attempted murder and rape. The experts that examined the boy concluded that he was lying. His family believed he was lying, and so did his friends.

In court I managed to prove that the boy was  lying about almost everything in his statement. I also proved that the police had lied in court, had produced false evidence, had harassed my friends, and that I had an alibi for the charges about sexual abuse. The prosecutor did not even try to deny this. He attacked me for being gay (something that is perfectly legal in Norway), and asked the jury to convict me for my political opinions and my sexual orientation. And the jury followed his advice. They knew that I was innocent, and still answered yes to most of the questions, including rape, because I dared to use my constitutional rights of free speech, because I dared to be idealistic, and because I dared to criticize the conditions of the police and the legal system in Norway!

I was sentenced to 2 years in prison, and to pay a fine of about $8000 (a little more than I earned each month at that time). When the police 3 weeks later realized that I was working to get more hard evidences against them, the called out armed forces to get me. I was sent to jail 4 months before the scheduled time. Now I was real angry! I refused to talk with them, I refused to pay the fine (I actually sold, gave away or destroyed all my belongings to prevent the authorities to get a single cent from me). And in the prison I refused to work.

The prison I was sent to is the Norwegian "model prison", a place that is presented to the press and the public as a very human place, with a great freedom for the prisoners, a place where "criminals" are turned into productive and well adjusted citizens. A very close friend of mine hung himself in that place in 1992. A prisoner that survived 5 years in on of the worst prisons in USA turned crazy after just 3 months of "special treatment".

A lot happened during the 15 months I was kept as a political prisoner. To some of the staff it became an obsessions to "break" me. I was harassed, beaten, kicked, called "queer", I found drugs planted in the room where I received visitors in a desperate attempt to frame me. I was threatened, refused food, money, soap and even toilet paper. I was kept isolated for a total of 8 months. Not once did they succeed in their attempts to manufacture new charges. Not once did they succeed in making me back off. My defense was passive resistance only. I never even raised my voice.

I am not a criminal. I am not a rapist. I don't do drugs. I don't even drink alcohol. But I am very, very angry. I refuse to accept a society that pretend to protect and encourage human rights and a better world, when the truth is that they prosecute human right activists and peaceful idealists with false, criminal charges.

My friends and my family has advised me to turn my back to the past and get back into a "normal life". I can't do that. My commitment to truth and justice is too strong, my sacrifices to these ideals too expensive. I have sworn that the Norwegian government shall walk over my dead body to get a single cent from me. I have sworn that the people that committed these crimes against me, and against the basic ideals of the population of this country; the police officers, the prosecutor, the jury, the judge - shall not get away with their crimes this time. Sometimes, very rarely, the criminals within the justice system choose the wrong person to mess with.

So, - why do I give away my software for free? There are several reasons. I don't want to give the Norwegian government any money. Not for the fine, and not in taxes. Of course, I could sell the software aboard and take steps  to prevent the money from falling into their hands. But that would be a crime. And as stated above - I am not a criminal. Not in any way! Another reason is my concern about free speech. Internet is being commercialized and censored, and the only way to secure the exchange of opinions , views, statements, and stories, is to make advanced communication software available to anyone. By providing the Internet community with free, high quality communications software, I hope that my contribution will help and encourage the exchange of all kind of information. Most of this information will be junk, some of it illegal, much of it also strongly against my personal opinions and values, - but that is the price we all have to pay if the free spirit shall survive.

And - why do I tell this story? Why do I expose my self for the risk of being called criminal, perverted or even rapist on the Internet? I do this because I have no other option. A false conviction is among the worst and most cruel crimes a person can be a victim of. I demand the right to be recognized as a victim of crimes, and not as an offender. I demand the right to be recognized as the person I am; a person with dignity, ideals and moral standards. You can choose to believe me, or you can choose to regard me as a liar - but frankly - would any sane person do what I do and tell a story like this, unless it is the truth?

This help file was created with HelpScribble.


About War FTP Daemon 1.70

I started writing War FTP daemon back in November 1995, after realizing that there was no decent freeware FTP server for Windows. In fact, at that time there was no freeware FTP server at all, - only a number of crippled shareware servers, that really didn't impress me too much. When the server was released about half a year later, it became very popular, and got a large number of very impressive reviews. One year later, the War FTP Daemon was generally regarded as the #1 FTP server for Windows. When reviewing other servers, the War FTP daemon is usually used as a reference, and the only scores given to other servers these days are simplicity. War FTP daemon obviously had all imaginable features, and hence, was a bit tricky to use for some users/reviewers. (Well – there was room for improvements, as you will see.)

In October 1996 I started to work on War FTP Daemon version 2. In December the source code for the alpha (pre-release) version was released, - and I continued to work on the code in order to release a beta. One year after I started on version 2, I decided to discontinue the development. The code was growing too complex, and the design had some major drawbacks. I made some research on a new design, and came up with some brilliant ideas for version 3. The time frame for version 3 was at least one year, so I decided to release a version 1.70, partially based on the design of the original server, and partially on the ideas for version 3. As I worked on 1.70, more and more code was written from scratch, or stolen from version 2 (the design had drawbacks, but after 1 year of development, version 2 indeed had some very useful and well debugged source code modules). Version 1.70 is in fact a bright new server, as almost no source code is left from version 1.66.

You might ask, what are the main changes since 1.66? Well – first of all – the server module and the user interface is split into different programs. The server is written using portable code, code that will soon be ported to Linux/Unix. The user interface is built on top of MFC – providing a state of the art Windows95/98 user interface. Most of the problems reported with previous versions have been related to users having problems figuring out how to configure the server correctly. When I designed the new user interface, I tried to meet the requirements of the most sophisticated user needs, while also making the configuration an easy task for novice users. The server code is also more robust, and has intelligent interpreting/error checking of configuration options. The user interface communicate with the server using ONC RPC (former SUN RPC), which is a well-established platform-independent protocol. The use of ONC RPC makes it possible for the server and the user interface to run on different machines, using different operating systems and even different microprocessor families (Intel/Alpha/Motorola). A Web server running on an enterprise Unix server can easily communicate with the War FTP Daemon, running on an NT server – just to mention one big benefit. The imagination of the users (and the skills of their programmers/software development departments) is the only thing that limits the possibilities with this new design.

The specs of 1.70 looks very much like the specs of version 2 – what's the difference between these versions? The main differences are that 1.70, from the outside, looks more like 1.66 than 2.0. 1.70 also lacks the plugin API interface promised for version 2. On the inside, 1.70 looks very much like version 2.

Ok – the server is very neat, flexible and easy – but to whom is it targeted? The only answer to that question is - to you! The server is scalable, making it the best choice for any FTP server need, no matter if you just want to share files between your work and home PC, or run a large-scale FTP server on Internet. The server is designed to meet any imaginable need's The only drawback for professional use is that the CPU/memory usage is a bit higher than the simplest competitors, such a MS FTP service or wftpd. But hardware is cheap – and this server takes full advantage of multi-CPU hardware for the largest imaginable FTP servers. While 1.66 was developed on a 10mbit network, and is unable to provide much more than 1 MB/sec throughput, 1.70 is developed on a 100mbit network (using a dual Pentium II motherboard on the development PC), and is only limited by the networking hardware in the machine!

When I told my friends that I was going to make a new FTP server, they asked me why? What would I gain? I already made the best FTP server ever written. There was no way I could get better ratings, as version 1.x already had top ratings on all major software sites on the net! To tell you the truth – the only reason for the top-ratings is that the other FTP servers are crap! War FTP daemon 1.x actually sucks, as it have major design drawbacks, serious bugs, and even lack the possibility to access the maintenance display when the server runs as a NT service! When I first started my goal was to make the first decent freeware FTP server for Windows. My goal with 1.70, and later on version 3, is perfection. My goal is not just to make the best FTP server (that's no big deal with today's competitors), - but making the best Internet server ever. That means writing c++ code that is poetry, taking maximum advantage of the hardware where the server is running, and being compatible with all related software, such as FTP clients, operating systems, and administrative tools.

At last – why did 1.70 take so long? Well – there are several reasons. I changed my mind about the scale of the changes. I also had some periods, lasting from weeks to months, where I was unable to do any coding at all due to personal problems. (I was the victim of a false conviction back in 1994. Sometimes the rage against the society and the so called 'justice system' is so strong that all I can focus on is figuring out very painful ways to kill judges and police officers.)  I also wanted to introduce some new features in 1.70. After almost two years without any major improvements, I needed to take the time to test and debug as much as possible.

What new features can be expected from the War FTP daemon? There are limitations to the FTP protocol. In 1997 I tried to make some suggestions to the FTP working group in regards of the next version of the FTP protocol. I was however pretty much ignored in that forum; something I found strange, as the War FTP daemon is among the most used FTP servers in the world. Anyway, I decided to work on my own server, rather than challenging the egos of people I've never heard about before, and just implement the new FTP specs in the server when (or rather if) they ever reach to a conclusion. War FTP daemon will be 100% compliant with the FTP protocol specification, but I will add my own new features to the protocol, that can be enabled by any FTP clients that support them. Since this server is so widely used, I hope that FTP client writers will take advantage of the extensions I plan, such as the interactive chat protocol, enhanced directory listings, asynchronous response messages, encryption, and enhanced file information options. In the end, it's up to the users do decide what FTP clients, and what features, they want.

This help file was created with HelpScribble.


Other FTP programs

Today it seems like every neewbie socket programmer has to make his own FTP server or client – and that means that there is a huge number of programs available – free as well as commercial. I won't list them all, as the list would be outdated in just a few weeks. To get kindof an overview of the Windows applications, visit http://www.nonags.com for the free ones, and http://windows95.com or http://www.tucows.com for freeware, shareware, and demoware.

There are however a small number of significant programs, that leads the way. Among FTP servers, you have wu-ftpd for Linux/Unix – probably the mostly used FTP server in the world, and wftpd for Windows. Wftpd was the first Winsock FTP server ever, and the author, Alun Jones, also helped giving birth to other ftp servers, such as serv-u, and has always been very active in the Winsock newsgroups, helping newbie programmers (and also the more experienced ones) out. Alun Jones is btw, the only programmer ever that have received any significant part of the pre 1.70 War-ftpd source code.

Among FTP clients for Unix, you have the original ftp client, which is rather primitive, and ncftp, which is my favorite command line FTP client. Ncftp is also available for 32 bit DOS (DOS running from Windows95 or NT). My favourite XWindows client is FileRunner. Among Windows FTP clients there are two very significant (and popular) choices, ws-ftp written by John A. Junod (early versions are available with full source code), and cute-ftp, written by Alex Kunadze (both are crippleware/shareware). Before I wrote my own FTP client (which is really not ready for mass distribution yet), Cute Ftp was my personal choice. Among the more fancy Windows clients, I could mention FTP explorer.

This help file was created with HelpScribble.


Support channels

Free support is available from:

#war_ftpd channel on Undernet (IRC network)

alt.comp.jgaa newsgroup

See also: http://www.jgaa.com/jgaasfreeware.htm#support

Commercial support is available from:

email: webmaster@ldp.no

Please see the War FTPD FAQ at http://war.jgaa.com:8080/faq/alt.comp.jgaa.faq.html before you ask for support.

This help file was created with HelpScribble.


Copyright and licensing

War Software series Copyright (C) 1996 - 1998 by Jarle (jgaa) Aase (www.jgaa.com)

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 2 of the License - WITH THE FOLLOWING RESTRICTIONS:

  * GOVERNMENTS, GOVERNMENTAL AGENCIES OR COMMERCIAL

    COMPANIES OWNED 50% OR MORE BY THE GOVERNMENT ARE

    NOT ALLOWED TO USE THE SOFTWARE OR SORCE CODE FOR

    ANY PURPOSE. THIS RESTRICTION ALSO APPLIES FOR

    PROGRAMS DERIVED FROM THE SOURCE CODE, OR PROGRAMS/

    SOURCE CODE THAT USE SPECIAL TECHNICS/ALOGRITHMS

    INVENTED IN THIS SOFTWARE.

  * THE FULL SOURCE CODE IS WITHELD FROM A PUBLIC RELEASE

    UNTIL THE LINUX VERSION IS RELEASED.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

This help file was created with HelpScribble.


GNU General Public License

Version 2, June 1991

Copyright (C) 1989, 1991 Free Software Foundation, Inc.

59 Temple Place - Suite 330, Boston, MA  02111-1307, USA

Everyone is permitted to copy and distribute verbatim copies

of this license document, but changing it is not allowed.

Preamble

The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.

When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.

To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.

For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.

We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.

Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.

Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.

The precise terms and conditions for copying, distribution and modification follow.

TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.

1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.

You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.

2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:

•	a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.

•	b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.

•	c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.

In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.

3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:

•	a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,

•	b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,

•	c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.

If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.

4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.

5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.

6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.

7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.

It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.

This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.

8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.

9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.

10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.

NO WARRANTY

11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.

one line to give the program's name and an idea of what it does.

Copyright (C) 19yy  name of author

This program is free software; you can redistribute it and/or

modify it under the terms of the GNU General Public License

as published by the Free Software Foundation; either version 2

of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,

but WITHOUT ANY WARRANTY; without even the implied warranty of

MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

GNU General Public License for more details.

You should have received a copy of the GNU General Public License

along with this program; if not, write to the Free Software

Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this when it starts in an interactive mode:

Gnomovision version 69, Copyright (C) 19yy name of author

Gnomovision comes with ABSOLUTELY NO WARRANTY; for details

type `show w'.  This is free software, and you are welcome

to redistribute it under certain conditions; type `show c'

for details.

The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:

Yoyodyne, Inc., hereby disclaims all copyright

interest in the program `Gnomovision'

(which makes passes at compilers) written

by James Hacker.

signature of Ty Coon, 1 April 1989

Ty Coon, President of Vice

This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.

Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA

Updated: 16 Feb 1998 tower

This help file was created with HelpScribble.


CdFs properties

See also the tech note about CdFs.

Menu: Server/Properties/CD-ROM

Right click in the CD-rom device/unit tree to add new units or devices.

Max concurrent op. - The maximum number of simultaneous IO operations to the unit. IO operations that exeeds the limit will be queued in the order they appear.

Cache Timeout - The time a cached file will remain in the disk-cache before it is deleted. The time limit is in minutes. A value of 0 means no limit.

Max cache size (MB) - The limit of the disk cache. The limit can be exeeded if the current active files exeeds the limit, but  idle files will be deleted as soon as new files are requested. The last used files will be deleted first.

Disk label. - The disk label is the label of the CD-ROM in a device (drive). If you map network drives, or use cd-changers where the CD-ROM's always have the same path/drive letter, you can check the 'fixed' button to prevent the server from polling the device at startup. Note: Currently you must check the fixed button on devices that are mapped over the network (as \\server\path) , as the server is unable to get the CD-ROM volume label from a network drive, unless it is mapped to a drive letter.

Directory message pattern - If the CD-ROM is made for FTP srever use, it might have a special file in the directorioes that contain an explanation about the contents in that directory. If you specify the name of that file, the server will display the message whne the user enters a directory. The message is stored in the disk-image of the CD-ROM's directory structure- and the use of messages will not give any extra access to the drive.

Cache dir - The directory the server will use as disk-cache of the CD-ROM for a unit.

Physical path - The physical path to the CD-ROM device. Normally a drive letter on the local machine, but this can also be a network path (like \\server\cd_1). See the note above about network drives.

Devices are automatically initialized when the server start up. If you change the CD-ROM in a device, you must manually issue a init or rescan command (right-click on the device) to make CdFs aware of the change.

This help file was created with HelpScribble.


Account - FTP User Login

User Type:

Anonymous visitor - Typically users without a private password. Should not have access to any sensitive areas.

Regular user - Users with unique names and (normally) private passwords.

Administrator - Privileged users that overrides the internal security checks in the server. The server will not give administrators admin rights in NT. NT users in the administrator group will normally have admin rights also in the server.

The server use these settings to determine how much a user can be trusted.

Password:

Password - A nornal (private) password is used. This should be set on all non-anonymous users.

Email address - Typically used to distinguish between anonymous users. Note that many FTP clients and WWW browsers supply a 'default' password.

Validate Email Address - If set, the server will check that the password looks like a valid email address. The server does not connect to a mail server to validate the password.

No password - The user will be logged when the server have received the user name.

Access:

Services the user have access to. Double click on the access property to toggle access. Like most other properties, the access permission can be inherited from a higher level. The icon shows the effective level and current state.

FTP login access - The suer have permission to log on to the fTP server

Server admin access - The user have permissions to use War Daemon manager to configure the server. Users with this service enabled should also be of user type administrator (see above).

See also User Manager

This help file was created with HelpScribble.


War FTP Daemon
War FTP daemon tm

The No.1 FTP server for Windows95, Windows98 and NT

Version 1.70

Preliminary documentation

War FTP Daemon is released as copyrighted freeware. You might use the software free of charge to whatever purposes you wish, private or commercially. Note: This software is not licensed to governmental or military use, and can not be purchased for such use.

* System overview

* Changes since version 1.65

* Application program or system service?

* Virtual domains/multihoming

* Firewall considerations

* Database support

* Feature list

* Other FTP programs

* Comments and suggestions

* Help and support

* Reporting bugs

* About War FTP Daemon 1.70

* About the author

* Copyright and licensing

* BETA notice

See also War Daemon manager, User Manager

Copyright © 1996 - 1998 by Jarle Aase, Jgaa's Internet

http://www.jgaa.com

All rights reserved.

This help file was created with HelpScribble.


War Daemon Manager

The Daemon manager is used to control the War FTP Daemon.

Click on the icons on the screen capture for more information.

This help file was created with HelpScribble.


The User Manager

The user manager is used to add/alter/delete users, classes, groups and virtual domain servers (including the primary server).

Overviews:

* Overview of the user database

* The power of inheritance

* Understanding the user manager

Howto:

* Set up basic user rights

* Set up file permissions

* Use a CD-ROM player or changer

* Link to the NT user database

* Set up an expiry condition

* Set time limit, CPS limit, max sessions

See also: War FTP Daemon

This help file was created with HelpScribble.


Technote: The User Database

The user database is kept in memory, and consist of object nodes organized in a tree structure, similar to a file system. A object can be a virtual domain, class, group or user. If you are familiar with Win9x/NT, you can think of virtual domains as disk drives, classes and groups as folders, and users as files. The User Manager is used to add, alter or delete these objects.

See also: User manager,

This help file was created with HelpScribble.


Security - FTP restrictions

Idle time in minutes: Specifies how long a user will be allowed to remain online before he is kicked of the system. This is part of the FTP specifications, and ment to prevent dead connections to remain online for ever. An idle connection takes up virtually no resources on your server. Some sites have however restrictions on how many concurrents essions they allow, and might want to prevent lamers from sleeping before their computers while at the same time preventing active, nice users from connecting to thge server. Some FTP clients will send NOOP to notifty the server that they're still alive. War FTP Daemon have an option to prevent the NOOP command from resetting the idle timer. See the ftpd_NOOP setting in the Daemon Manager (menu Server/Advanced Server Properties).

Max simultaneous sessions: This defines how many simultaneous sessions that are allowed from one user. If the property is set on a ovject level highter than user, the property will simply be stored as a recursive setting for the users in the tree below. Be aware that many persons share some user accounts, like the anonymous user and that such accounts therefore should have a larger value than normal single-user accounts.

Max simultaneous sessions from one machine: This defines how many simultaneous sessions that are allowed from one host on Internet (IP address). Many sites sets this to 1 to prevent one machine from taking up several connections and steal bandwith from other users. Be aware that some FTP clients require several connections to work (FTP Explorer, MS Internet Explorer, Netscape navigator).

Max time (minutes pr. session): This setting is useful on high-traffic sites where the max allowed connections often are reaced. By setting a tim-limit pr. connection, no user can stay online forever, preventing others from getting access. The user will not be disconnected during a file transfer.

Max CPS: Restricts the bandwith on a pr. user connection basis. The max CPS limit is measured in sampled and total CPS for the connection. The method used to limit the CPS is to check the CPS after all network traffic. If the current CPS reading or the total CPS reading exceeds the limit, the transfer is suspended until the reading is below the limit. If the machine has large network buffers, and the limit is small, this can result in suspension in several seconds. The connections are tested individually, so one or more transfers can be suspended while other transfers are active. A more advanced CPS scheduling - based on the total available bandwidth for the server and group priorities is planned.

See also: User Manager

This help file was created with HelpScribble.


Settings

See Security - FTP Restrictions

This help file was created with HelpScribble.


Account Expiry

Some FTP sites have user accounts with a limited "lifetime". This can be handled automatically by the server.

When the account expires, it can be moved to the parent node of the anonymous user (usually the visitor class), disabled (login denied), or deleted.

Note: If it is moved to the parent of the anonymous user, properties set up for this account (and not for the parent node) will be kept. Therefore – if you plan to move accounts to the anonymous parent when they expire, do not give the account itself special privileges. Give the privileges to the parent node. That way the user will lose his privileges when the account is moved.

If you use the date, the date expires at 00:00 local time at the given date.

If you set the properties on a non-user node and check the 'Set relative to next login' box, the properties will be activated on each affected user node as the log on. The user node copies the inherited properties, and the settings are used on the user level. If you decide to change the settings, for all the affected users, you will have to go trough the affected user nodes manually and correct the settings.

Login counts, if you use that method is counted as multisession logins. That means – if a user log on several times simultaneously, or within a short time-interval, that is counted as one login. This gives users of FTP clients like FTP Explorer, or Web browsers the same number of 'logins' as other users.

This option is designed for automatically created user accounts.

Only users will expire. Higher level objects will simply store the recursive settings for the user tree below. To avoud problems where the server scans for expiry while you edit these settings, there wil be a short delay set on the property each time you make changes.

See also: User Manager

This help file was created with HelpScribble.


Account - Subclassing

War FTP Daemon supports subclassing of external user database sources.

When a user is subclassed, properties such as name and password are taken from the external source. Subclassing is an advanced option, and you should read the documentation carefully before configuring it.

See also: User Manager

This help file was created with HelpScribble.


Security - File Access

The file paths defined here defines what parts of your file sytsem the FTP users will be able to access, and how the file system appears to the users. Your phusical file system is made up by one or more disks, and possible one or more CD-ROM players. You might also have network drives or network paths avaiable.

C: [Win98]

D: [CD-ROM]

N: [E: on NTSERVER]

\\NTSERVER\share

The FTP users however will always see a consistent file system, starting at the file system root /. After you have installed the server, the file system will look like

/

/bin

/pub

/usr

/upload

You can add new paths to the users file system, remove existing paths, and set permissions on each single path, both recursively and for a single directory. The easiest way to add a new path is to drag the path from the Windows Explorer into the path window. But you can also right-click in the window and select "New" from the popup menu.

After you have added a path, you must set the permissions. The easiest way is to right-click ob the path and use one of the pre-defined settings from the pup-up menu.

Deny:  	- Deny all access to the path. The path is listed in the directory listing if the directory listing.

Recursive:	- The settings applies for this path and all paths below.

Free:	- The files in the path is excluded from upload/download ratio restrictions

Create:	- Allow creation of directories

Remove:	- Allow deletion of directories

List:	- Show the contents of the path in directory listings. The path itself will be visible, even if the content is hidden.

Hide:	- Hide the path.

Read:	- Allow download

Write:	- Allow upload (delete permission must be set to in order to uploaad over existing files)

Delete:	- Allow file deletion

Execute: 	- Reserved for future use.

Note: CD-ROM players can be handled as special devices trough CdFs, and the Cd-ROM's accessed by their volume labels rather than the physical/logical path.

Double-click on the path to set the Path Properties.

Note: The file access paths are recursive, that is, if a path is defined on a level above a user, the user inherits the path. If there are two duplicate paths defined on two different levels (f.eks. both the user group and the user) the lowest level (user) takes precidence, and the higher level path property is ignored. This is new in version 1.70). A duplicate is an instance where the user file system path is equal.

Tip: Assign paths on the highest possible level, and let the levels below inherit the properties. This makes it alot easier to maintain the site and do changes at a later time. Assigning the same paths again and again for each single user gives you alot of extra work, and only prooves that you either havent understood how the server work, or that you are a lamer.

See also User manager, Path Properties, CdFs, Inheritance, Understanding the user manager

This help file was created with HelpScribble.


Path Properties

File system:

File - The native file system for the operating system (FAT, FAT32, NTFS, network drives etc.).

VfSys - Not implemented. Just a alias to File at the moment

CdFs - Unique CD-ROM File System.

The file system selected determines how the server interperets the paths, and how files are handled. CdFs will i.e. never access a physical CD-ROM before the user request a file. File on the other hand will not cache any information.

Note: The server does not check paths to see if a path is compatible with or optimal for the selected file system. It is your responsibility to select the appropriate file system whne you add a path.

Path: - The physical path. Normally a path like C:\ftp\files, but network paths like \\NTSERVER\share are supported. A special file system (like CdFs) might allow special paths, like $/MyCDLabel

Note: If you start the server as a NT service, you can not use the local system account if you use network paths. Create a special NT user account for the server on the Domain controller, give it the "log on as service" priviegie, and assign it to the local Administrators group. The syntax in the Startup properties for a domain user is NTDOMAIN\UserName.

Mount point: - where in the users file system the the path turns up, and it's name. There are a few simple rules for the mount point:

The path (except for the directory name) must exist in the file system, or be defined as a mount point. If you have set the server up so the user have a /pub path, you can use /pub/myfiles as a mount point. Unless /pub/myfiles already exist, you can not say /pub/myfiles/bla/bla/mynewfiles. If there is a directory in /pub named "myfiles" and you specify /pub/myfiles as a mount point, the physical "myfiles" folder in /pub is ignored.

Lot's of users of the War FTP Daemon have asked for an option where they could add paths down in the directory structure without using links. The new mount point (prevoius called aliases) provides this functionality.

Freeze the mount point: - The server will normally assign a accurant mount point based on the users current user file system. If you want to enforce a special mount point, you can check this property.

See also: User Manager, File Access

This help file was created with HelpScribble.


Connection Properties

The connection properties dialog is used to connect the manager to a server.

Tips: If you use the File/Save menu in the managers main window, you can save the properties to a file, and connect to the server again simply by double cliking on it from the File Explorer.

Host: 	The server you will connect to. This can be an IP number (ie. 193.91.161.12) or a domain name (ie. ftp.no.jgaa.com).

Port: 	The port used by the server for the RPC interafce. Normally you will use the default value, as most servers use the portmapper service to assign port numbers on the fly. Some servers will however use a fixed port number to avoid problems with firewalls, or to allow several instances of the server to run on one machine.

Tag: 	The tag is a unique name (on the machine) used to identify the server. The tag is used in the registry, to identify shared memory and process syncronizatation objects, and as the NT service name if the server is running as a NT service. You will normaly use the default value.

Speed: 	The speed of the network-link between the manager and the server. This parameter is used by the manager to determine how often it will query the server for the current status (and user list), and update the console. The update query takes machine resources, and if you have many users online, the server can stall (or eat all available CPU power) if you specify a fast link. On servers with very many users online (50 - 100 or more) you should use the 'manual update only' value.

User ID: 	The user ID you will log on as. The user account must have server admin access, and should also be Administrator (in the server)

Password: The password for the account.

Remember password: Saves the password along with the connection properties if you use the File/Save command in the managers main window. If this option is unchecked, you will be prompted for password before you can log on to the server.

Automatic login: If checked, the manager will attempt to connect to the server when the saved connection properties file is opened.

This help file was created with HelpScribble.


Startup properties

The server can run as a normal program, or start as a system service/daemon. The difference is 1) A service will normally start up when the machine starts up, and 2) A service does not shut down when you log out. A service will run from the machine starts up, to the machine is shut down. A normal program on the other hand must be started by a user (who has to log on to Windows) and is shut down automatically (by Windows) when the user logs out.

Win95/98 properties:

Run as daemon/system service: If checked, the server will start up as a system service when windows start up, and continue to run until the machine is shut down (unless you shut it down from the manager). Users will be able to log on to the server at about the same time as the logon dialog apears in Windows. You must restart Windows before the changes takes effect.

NT properties:

Note: The server must run in the user space of an administrator in order to change the startup properties. The administrator must have the "act as part of the operating system" privilege. If this privilege is missing, start the NT user manager and add the privilege. Then shut down the server, log out and back in for the NT privilege to take effect.

Run as daemon/system service: If checked, the server will be enabled to run as a native NT service.

Start automatically when the machine starts up: If checked, the service will start when NT starts up.

Run as privileged super user/Administrator: If checked, the service wil run in the user space of the local Administrator (not the domain admin). This is the recommended setting.

Run as user: If checked, the server will start in the user space of the specified local user. If no user name is given, the service will start in the user space of the local Administrator. The server will verify that the given user exist, and that the password is valid. The user will be granthed "logon as a service" and "act as part of the operating system" privilegies.

Shared properties:

Priority: The priority you want the server to run at. If you set the priority to "Low", the server can have any load without affecting your deesktop programs. The server will however stall if you run CPU intensive programs (like large print-jobs or compilations). If the machine is primarily an Internet server, the priority should be "Normal" or "High".

Note: You must press the "Update" button to set these properties.

See also Path Properties

This help file was created with HelpScribble.


User daemon API

The User daemon is the user database in the War daemons, and the session manager. The user database stores all the users, while the session manager keeps track of the connections. The user database is shadowed on disk and will re-load when the user daemon starts up, while the session data is kept in memory only.

There are several low-level interfaces to the user database. To avoid problems with different versions of the servers, and also to keep a simple, consistant interface for all access no matter if it comes from an external program of plugin, the WarUserHandle class should be used. This handles all manipulations of the user database and the session manager, and works in server functions, plugins and external programs.

Security

Currently the security is relatively weak. Only the password to establish the connection is encrypted. This is no problem if the connection is made on the local computer, but it might be a problem if you want to manage the server over Internet. Someone might listen to the connection, and decrypt the system password. This problem will be addressed in a later version of the library. (Hacking the system today is possible if someone can listen to the connection, but it is not trivial).

Currently the system is based on a modified AUTH_UNIX scheme. When the login call is made the client autentication is set to AUTH_NONE. As soon as the login is ok, the client change to AUTH_UNIX and set the group table to a value returned by the login call. This value is the unique session verifier for the sever, and no RPC call (other than the login call) will succeed without a valid session identifier. The server stores a copy of the session identifier and the host address of the caller. Validation of subsequent calls is made on the verifier and host address. This security scheme is not ideal, but itshould work with any ONC RPC implementation. A later version will add the option to use a custom AUTH_ method. This will be more secure and faster, but will require any program that access the server to link with the War ONC RPC library.

If you link your program with the War ONC RPC library and use the WarUserHandle class, you don't have to worry about the security. The class takes care of this.

See also: WarUserHandle class

This help file was created with HelpScribble.


WarUserHandle class

Header file: "../include/WarUser.h"

The WarUserHandle class is the primary API to the user database.

The class communicate with the user daemon (part of the War FTP Daemon) trough ONC RPC (former SUN RPC) remote procedure calls over UDP/IP or TCP/IP. The maximum buffer size for each message is ~8 KB. Because of this limit, some operations will require several calls to the user daemon to complete.

Before the server can be accessed over this interface, the calling process must log on to the user daemon with a valid username and encrypted password. The RPCLogin() member function will attempt to establish a new connection wit the user daemon.

Class members

Sesson manager API

Authentication

RPCLogin()

User manipulation

Query()

Server manipulation

SetServerInfo()

Low level

ReadBuffer()

Network support

NT network wrapper calls

This help file was created with HelpScribble.


WarUserHandle::RPCLogin()

BOOL WarUserHandle::RPCLogin(LPCSTR Name, LPCSTR Passwd,

user_node_type UserType = UT_USER,

war_svr_type ServerLogonType = WST_INVALID);

LPCSTR Name	- User ID (name)

LPCSTR Passwd	- Password

user_node_type UserType	- User type. This will normally be UT_USER

war_svr_type ServerLogonType	- Server type.

This function logs a user on to the user manager. Authentication information is saved in the server. The password is sent encrypted to the server.

Normally this function is used to log a user on to the user manager in order to manipulate or query the user database. But servers that need to register themselvs with the server manager will olso use this call. The server must be a valid type enumerated by war_svr_type.

This help file was created with HelpScribble.


WarUserHandle::Query()

LPCVOID WarUserHandle::Query(user User, wdq_qmode QueryMode,

wdq_mode DataMode);

user User	- User identifier

wdq_qmode QueryMode	- Absolute or relative

wdq_mode DataMode	- Data to get

wdq_qmode

WDQM_ABSOLUTE gives the absolute data associated with the requested user. Note that most properties are recursive, so that a 'default' setting will give a effective setting from a previous level. Some properties will also collect the absolute values from all levels. This mode is most useful in programs where you need to know the setting on a specific level, and not the effective setting for the user.

WDQM_EFFECTIVE gives the effective settinngs for the user. The exact implementation will vary a bit from property to property, depending on wether the property can be recursive or not.

WDMQ_ALL not used unless explesit spesified for the property.

wdq_mode

wdq_mode is used to identify the data requested by a Query() call.

WDQ_DAEMON_INFO returns a war_daemon_info pointer, used to identify a virtual domain, and all servres enabled/configured for that domain.

This property is not recursive. You must address the UT_SYSTEM level or the UT_DOMAIN level 'user' node you need information about.

The QueryMode is ignored but should be WDQM_ABSOLUTE to be compatible with future revisions of the request.

WDQ_EXPIERY

WDQ_IP_ACCESS_LIST

WDQ_USER_FS_ACCESS_LIST

WDQ_USER_INFO

WDQ_GREETING

WDQ_FTP_STAT

WDQ_FTP_UDR

WDO_FTP_BANNED_FILES

WDO_FTP_LOGIN_ACCESS /* Login access */

WDO_FTP_LOGIN_IDLE	/* Idle time */

WDO_FTP_LOGIN_SIML /* Simultaineous logins */

WDO_FTP_LOGIN_SIMIP /* Simultaineous logins on IP */

WDO_FTP_LOGIN_MAXT /* Max login time */

WDO_FTP_LOGIN_MAXCPS /* max CPS */

WDO_FTP_LOGIN_TIMEM /* Time mask */

WDO_USER_PTYPE /* User privilegie type */

WDO_FTP_ADMIN_ACCESS

WDO_USERDB_ADMIN_ACCESS

WDO_LOG_ADMIN_ACCESS

WDO_VFSYS_ADMIN_ACCESS

WDO_FTP_DUP

WDQ_USER_SUBCLASS /* Get subclass data */

This help file was created with HelpScribble.


WarUserHandle::SetServerInfo()

BOOL WarUserHandle::SetServerInfo(user User, war_daemon_info &Info)

This call will set the server info on the server.

the Iinfo::m_Addr member is ignored, and the value is set on the server, by a DNS lookup on Info::m_HostName. Note - the DNS lookup is performed in blocking mode, so the user engine will stall until the name is resolved. The host name can be defined as a IP number ("1.2.3.4") or a domain name ("ftp.jgaa.com").

The Info::m_Port[] entries will only be set if the port-number is non-zero.

If this call is performed in a node that is not UT_SYSTEM or UT_DOMAIN, it will return FALSE, and set the error value to USERR_INVAL.

This help file was created with HelpScribble.


ReadBuffer()
WarUserHandle::ReadBuffer()

Low level

BOOL WarUserHandle::ReadBuffer(int ID, int From, int Bytes, LPVOID *ppBuffer, int& BytesRead, BOOL& IsEOF);

int ID	A valid handle to a buffer in the user manager.

int From	Start offset (in 8 bit bytes) to start reading from

int Bytes	Number of bytes to read

LPVOID *ppBuffer	This pointer is set to a temporary buffer containing the data read if the call was successful

int& BytesRead	Returns the bytes actually read

BOOL& IsEOF	Set to TRUE if there is no more data to read. Else it is FALSE.

return value

Pointer to a temporary buffer containg the read data, or NULL if the read failed. WarUserHandle::GetLastError() can be used to examine the cause if the operation failed.

ReadBuffer() is a low-level call that is normally used by other WarUserHandle:: class members to complete their tasks.

This help file was created with HelpScribble.


NT Network wrappers

These member functions calls NT network functions trough the server. They allow the NT network browser in WDM to get domain and server information, and to cerate a new group in the NT user database. By security reasons, I do not supply calls to delete a NT user or group.

The user who call these functions must have ADMINISTRATOR rights in the War user database. The server must run on a NT server or workstation, in the userspace of a NT Domain administrator or NT administrator (The native network calls are only supported by Windows NT).

BOOL WarUserHandle::WarNTAddGroup(LPCSTR Host, LPCSTR Name, LPCSTR Comment, BOOL bMakeGlobal);

WarString WarUserHandle::WarNTGetDC(LPCSTR Machine = NULL, LPCSTR Domain = NULL);

Returns the primary Domain Controller for the machine or domain. If both Machine and Domain is NULL, the primary domain controller for the war server is returned. If Machine or Domain has a macine or domain name, the primary controller for that machine or domain is returned. If both Machine and Domain has a value the result is undefined.

WarLinkedList *WarUserHandle::WarNTGetDomains(LPCSTR RunOnMachine = NULL);

If successful, the WarLinkedList contains nodes of type WarNTServerInfo. The list and nodes must be deleted by the calling function.

WarLinkedList *WarUserHandle::WarNTGetServers(LPCSTR RunOnMachine, LPCSTR Domain);

If successful, the WarLinkedList contains nodes of type WarNTServerInfo. The list and nodes must be deleted by the calling function.

WarLinkedList *WarUserHandle::WarNTGetGroups(LPCSTR Host);

If successful, the WarLinkedList contains nodes of type WarNTGroupInfo. The list and nodes must be deleted by the calling function.

This help file was created with HelpScribble.


Session Manager API

The Session manager API is part of the WarUserHandle class.

BOOL QueryHost(in_addr& Host);

const sesmgr_query_session_list *SesMgrQuerySessions(sesmgr_query_session_req& Arg);

const sesmgr_query_session_list *SesMgrQuerySessions(int NextIndex);

BOOL SesMgrSet(QWORD SessionKey,

QSWORD NewIdleTime, sesmgr_sdt Mode, ...);

BOOL SesMgrHelo(QWORD SessionKey, DWORD& Flags);

WarOption *SesMgrGetOption(LPCSTR Name, int Index);

BOOL SesMgrSetOption(LPCSTR Name, int Index, LPCSTR NewValue);

BOOL SesMgrSetFlag(DWORD Mask, DWORD Flag, sesmgr_set_flag_mode Mode, ...);

sesmgr_query_system_info_reply *GetSystemInfo();

sesmgr_query_system_current_reply *GetSystemStats();

sesmgr_query_domain_reply *GetDomainInfo(int Index); // Index start at 1

sesmgr_query_usersonline_reply *GetUsersOnline(int StartIndex); // Index start at 0

sesmgr_query_host_reply *GetHostsOnline(int StartIndex); // Index start at 0

svrmgr_sysmsg *SesMgrGetSysMsgs(int &NumReturned);

BOOL SesMgrSetSysMsg(LPCSTR FileName, LPCSTR Text);

BOOL SesMgrGetSysMsg(LPCSTR FileName, WarString& Text);

svrmgr_macro *SesMgrGetMacros(int& NumReturned);

sesmgr_file_info_reply *SesMgrQueryFiles(sesmgr_file_info_req& Arg);

sesmgr_log_event *SesMgrQueryLog(QSWORD EventID, DWORD Mask);

BOOL SesMgrSaveUserDB();

sesmgr_ud_restrictions_data *SesMgrGetCredits(QSWORD SessionKey);

cdfs_unit_list *SesMgrQueryCdFsData();

BOOL SesMgrCngCdFsData(cdfs_chg_mode Mode, ...);

This help file was created with HelpScribble.


WarUserHandle::SesMgrCngCdFsData()

BOOL WarUserHandle::SesMgrCngCdFsData(cdfs_chg_mode Mode, ...)

Part of the Session Manager API

The parameters depend on the mode, and are not optional.

CFDSM_ADDUNIT - add a new unit

LPCSTR Name - Name of the new unit. The name must be unique

LPCSTR CacheDir - The tmp dir to store cached files

int MaxSimAccess - Max IO requests that the units can handle at one time

int CacheTimeout - Time in seconds to keep a cache entry after the last client has closed it, before it is deleted.

int LRUnum - Number of files to keep in a LRUcache. While a file is in the LRU cache, the timeout is ignored.

DWORD Flags. Reserved. Must be 0.

CDFSM_DELUNIT - delete a unit

LPCSTR Name - name of the unit to delete

CDFSM_CHGUNIT - change the properties of a unit

LPCSTR CurrentName - The current name of the new unit.

LPCSTR NewName - Name of the unit (can be equal to CurrentName or something completly different). The name must be unique

LPCSTR CacheDir - The tmp dir to store cached files

int MaxSimAccess - Max IO requests that the units can handle at one time

int CacheTimeout - Time in seconds to keep a cache entry after the last client has closed it, before it is deleted.

int LRUnum - Number of files to keep in a LRUcache. While a file is in the LRU cache, the timeout is ignored.

DWORD Flags. Reserved. Must be 0.

CDFSM_ADDDEV

LPCSTR UnitName - Name of the existing unit where the new device is to be stored.

LPCSTR DeviceName - The unique name of the new device. Can not be equal to other CD devices or units.

LPCSTR Path - The system dependent path to the device (ie. I:\)

LPCSTR Label - The label in the drive. This argument is ignored unless the CML_FIXED_LABEL flag is set in the flags argument.

LPCSTR DirMessageFile - An (optional) pattern for a "Dirctory message File" if that is used on the CD in the device. If NULL, the system will look for the default name.

DWORD Flags.

CML_FIXED_LABEL - Always use the supplied label. This is required for network paths

CDFSM_DELDEV

LPCSTR DeviceName - The name of the device to delete

CDFSM_CHGDEV

LPCSTR CurrentDeviceName - the current name of the device.

LPCSTR DeviceName - The unique name of the new device (can be equal to CurrentDeviceName). Can not be equal to other CD devices or units.

LPCSTR Path - The system dependent path to the device (ie. I:\)

LPCSTR Label - The label in the drive. This argument is ignored unless the CML_FIXED_LABEL flag is set in the flags argument.

LPCSTR DirMessageFile - An (optional) pattern for a "Dirctory message File" if that is used on the CD in the device. If NULL, the system will look for the default name.

DWORD Flags.

CML_FIXED_LABEL - Always use the supplied label. This is required for network paths

CDFSM_RESCAN

LPCSTR DeviceName - The unique name of the device to rescan.

CDFSM_INIT

LPCSTR DeviceName - The unique name of the device to initialize. The initialize process will try to load the volume from disk, and perform a full rescan if no image is present.

This help file was created with HelpScribble.


System overview

War FTP Daemom consist of to programs, - the FTP server and the Daemon Manager. The FTP server runs totally hidden form the Windows desktop. The Daemon Manager is a normal Windows program. When you run the manager, it will communicate with the server (using Winsock) and allow you to view the current user activity, set configuration details, or alter the user database. The server can start automatically when the machine starts (before you log on to Windows). The manager can be started and stopped without starting or stopping the server.

+-------------------+

|   Daemon Manager  |

|                   |

| (Windows program) |

+-------------------+

||

\/

 Winsock

||

\/

+-------------------+

|      Server       |

|                   |

| (Hidden program   |

| or system service)|

+-------------------+

Unless the server crash, you will never see it. All inetraction with the server is done trough the manager, other system tools, and FTP clients. It is very important that you understand this. If you want to shut down the server, you must press one of the STOP buttons in the manager. Quitting the manager will only quit the manager program, and not the server. The same goes for starting the server. Starting the manager when the server is not running will not allow anyone to log on. To start the server you must press the START button in the manager. If you start the server from the shell (explorer, file manager or DOS prompt), users will be allowed to log on to the server, but the manager will not start by itself.

This help file was created with HelpScribble.


RPC - Remote Procedure Call
War FTP Daemon use ONC/RPC (former SUN RPC) to allow external programs (like the daemon manager) to communicate with the server.

This help file was created with HelpScribble.


Portmapper
The 'portmapper' is a service defined by the ONC/RPC interface used by the server. The portmapper is a light-weight server that keeps track on what port numbers different services on the machine is using. When a client program need to connect to a service, it queries the portmapper about the port-number the service is using, and then connects itself to that port number. The portmapper service is invented to avoid assigning 'well known port numbers' to all kind of programs (there aren't enough ports in the TCP/IP protocol for that).

This help file was created with HelpScribble.


WDM - War daemon manager
War Daemon manager is the user interface to the server. The program communicate with the server trough RPC (Remote Procedure Call), and can therefore access the server from anywhere on your network, or over Internet. You need a the user name and password to a privileged user in order to connect WDM to a server.

This help file was created with HelpScribble.


Sessions view
The sessions view lists all current sessions to the server, on all virtual domains.

This help file was created with HelpScribble.


Servers view
The Servers view list all the virtual domain servers that is running. Most systems will only list one server. If you runn a multihoming system, all the virtual domains will show up.

This help file was created with HelpScribble.


Users view
The Users View lists all the current and recent user sessions to the server. This view will only list a user once, even if the same user have multiple sessions active (typically the anonymous user).

This help file was created with HelpScribble.


Hosts view
The Hosts view list all hosts that are known by the server, or a selection of your choise. A host is a machine somewhere on the net.

This help file was created with HelpScribble.


Select view
The select view lists a slection of the current sessions to the server. You choose the selection by using the listbozes on the bottom of the window.

This view is under construction.

This help file was created with HelpScribble.


Files view
The Files view lists all files that have been transfered to and from the server since it started. The number of downloads are counted for each file.

This help file was created with HelpScribble.


Log view
The Log view lists recent log events.

This view is under construction.

This help file was created with HelpScribble.


struct war_daemon_info

enum war_svr_ports

{

WSP_FTPD, /* FTP daemon port index */

WSP_INVALID, /* Last known service type */

WSP_MAX = 16 /* max service types */

};

struct war_daemon_info

{

in_addr m_Addr; /* Actual host - read only*/

RPC_string m_HostName; /* Virtual domain address, IP or name */

short m_Port[WSP_INVALID]; /* Port to use */

int m_GoOnline; /* bitfield - Go online automatially st startup */

int m_Enabled; /* bitfield - Service is enabled */

};

The bitfields in war_daemon_info resolves to the server index in war_svr_ports.

if (Val.m_Enabled & (1 << WSP_FTPD)) is a valid test to see if the FTP server is enabled.

The ports also resolve to war_svr_ports. int Port = Val.m_Port[WSP_FTPD]; returns the port to use for the FTP server.

war_daemon_info is used to define a virual server. The IP address is the IP address the server will listen to, and the other variables are used to store basic information shared by all non-RPC servers (FTP for now). Other datastructures might contain more information about a spesific server.

This help file was created with HelpScribble.


struct struct cdfs_unit_list

struct cdfs_unit_list

{

RPC_string m_Name; /* Logical name of the device, used by War */

RPC_string m_CacheDir; /* Temporary storage for cached files */

int m_MaxSimAccess; /* Max concurrent IO requests to the unit */

int m_CacheTimeout; /* Time to keep a file in the cache after all IO is finished */

int m_LRUnum; /* Number of files to keep in the cache (even if they time-out). */

int m_NumPendingRequests;

cdfs_mount_list *m_pMountList;

cdfs_unit_list *m_pNext;

int m_pHandle; /* Not used by the RPC interface (ptr to server internal data) */

};

struct cdfs_mount_list

{

RPC_string m_Name; /* Logical name used to access the drive from the server */

RPC_string m_PhysPath; /* System dependent path to the CD-ROM player */

RPC_string m_DirMessageFile; /* Pattern for directory message files */

cdfs_dev_states m_CurrentState;

cdfs_mount_list *m_pNext;

};

This help file was created with HelpScribble.


enum cdfs_chg_mode

enum cdfs_chg_mode

{

CFDSM_ADDUNIT,

CDFSM_DELUNIT,

CDFSM_CHGUNIT,

CDFSM_ADDDEV,

CDFSM_DELDEV,

CDFSM_CHGDEV,

CDFSM_RESCAN,

CDFSM_INIT,

};

This help file was created with HelpScribble.


HelpScribble

HelpScribble is a help authoring tool written by Jan Goyvaerts. This help file was created with the unregistered version of HelpScribble, which is why you can read this ad. Once the author of this help file is so honest to register the shareware he uses, you will not see this ad again in his help files.

Recompiling the help project with the registered version is all it takes to get rid of this ad.

HelpScribble is a stand-alone help authoring tool. It does not require an expensive word processor. (Only a help compiler as Microsoft likes keeping the .hlp format secret. Not my fault.)

Here are some of HelpScribble's features:

•	The Setup program will properly install and uninstall HelpScribble and all of its components, including registry keys.

•	Create, edit and navigate through topics right in the main window. No need to mess with heaps of dialog boxes.

•	All topics are listed in a grid in the main window so you won't lose track in big help projects. You can even set bookmarks.

•	Use the built-in Browse Sequence Editor to easily create browse sequences.

•	Use the built-in Window Editor to change the look of your help window and create secondary windows.

•	Use the built-in Contents Editor to create Windows 95-style contents files. Works a lot better than Microsoft's HCW.

•	No need to mess with Microsoft's SHED: use the built-in SHG Editor to create hotspot bitmaps. Draw your hotspots on the bitmap and pick the topic to link to from the list.

•	With the built-in Macro Editor you can easily compose WinHelp macros whenever needed. It will tell you what the correct parameters are and provide information on them.

•	If you have a problem, just consult the online help. The help file was completely created with HelpScribble, of course.

•	HelpScribble is shareware. However, the unregistered version is not crippled in any way. It will only add a small note to your help topics to encourage you to be honest and to register the shareware you use.

These options are very interesting for Delphi and C++Builder developers:

•	If you are a component writer, use the Delphi Parser to build an outline help file for your component. Just fill in the spaces and you are done. HelpScribble can also extract the comments from your source file and use them as the default descriptions.

•	If you are an application writer, HelpScribble provides you with a property editor for the HelpContext property. You can select the topic you need from a list of topic titles or simply instruct to create a new topic. No need to remember obscure numbers.

•	The property editor also provides a tree view of all the components on your form and their HelpContext properties. This works very intuitively. (Much nicer than those help tools that simply mess with your .dfm files.)

•	HelpScribble can perform syntax highlighting on any Delphi source code in your help file.

HelpScribble is shareware, so feel free to grab your copy today from my web site at http://www.tornado.be/~johnfg/